//
//  VCDownloadManger.h
//  VC
//
//  Created by 肖康龙 on 2017/8/30.
//  Copyright © 2017年 vsoontech. All rights reserved.
//



#import <Foundation/Foundation.h>
//#import <IJKMediaFramework/IJKMediaFramework.h>
#import "VCPlayerManager.h"

@class VCDownloadManger;

@protocol VCDownloadMangerDelegate <NSObject>
/**
 *url :播放地址
 */
-(void)download:(VCDownloadManger *)dounload url:(NSString *)url;
/**
 *url :播放地址
 */
-(void)download:(VCDownloadManger *)dounload player:(VCPlayerManager *)player;

/**
 *返回播放器的缓冲时间(秒)
 */
-(NSTimeInterval)playerBufferTimeWithdownload:(VCDownloadManger *)dounload ;
@end

@interface VCDownloadManger : NSObject

/**初始化数据,主要是请求加解密数据*/
+(void)initData;
/**单例*/
+(VCDownloadManger *)DownloadManger;

/**视频的列表*/
@property (nonatomic,strong)NSDictionary *dict;

@property (nonatomic,weak)id<VCDownloadMangerDelegate>delegate;
/**服务器链接*/
@property (nonatomic,strong)NSString *urlString;
/**是否返回了地址*/
@property (nonatomic,assign)BOOL isReturnAdd;
/**
 *设置当前播放时间点(用于seek操作)以及获取当前播放的时间点
 */
@property(nonatomic,assign) NSTimeInterval currentPlaybackTime;


/**下载ID*/
-(void)downloadVideoWithId:(NSString *)linkId;


/**停止
 *playTime 播放的时长
 */
-(void)stopDownload;

/**启动调试页面
 */
-(void)startDeBugViewCaton;
/**去除调试页面*/
-(void)removeDebug;
/**播放器暂停播放*/
-(void)playerSuspendPlay;
/**播放器开始播放*/
-(void)playerStartPlay;
/**开启本地服务器*/
- (void)openServer;
@end
